﻿package rob.util{
	
	public class NumberUtil{

		public static function constrain(x:Number,min:Number,max:Number){
			if(x < min) return min;
			else if(x > max) return max;
			return x;
		}
		
		public static function nearZero(x:Number):Boolean{
			if(Math.abs(x) < 0.0001) return true;
			return false;
		}
		
	}
}